import yagmail

def email(filename):
    yaml = yagmail.SMTP(host='smtp.qq.com',user='2410811597@qq.com',password='uzwlvaboffeqecfh')
    yaml.send(to='2410811597@qq.com',subject='主题',attachments='内容',contents=filename)